package com.shoe.service.impl;

import com.shoe.mapper.AdminLogisticMapper;
import com.shoe.pojo.AdminLogisticPojo;
import com.shoe.service.AdminLogisticService;
import com.shoe.util.DateConversion;
import com.shoe.vo.AdminLogisticVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdminLogisticServiceImpl implements AdminLogisticService {

    @Autowired
    AdminLogisticMapper adminLogisticMapper;

    @Override
    public List<AdminLogisticVo> selectALogisticByCondPage(Integer page, Integer limit, String logisticLogisticnum, String orderState) {
        return adminLogisticMapper.selectALogisticByCondPage(page, limit, logisticLogisticnum, orderState);
    }

    @Override
    public List<AdminLogisticVo> selectAdminLogisticByCondition(String orderState) {
        return adminLogisticMapper.selectAdminLogisticByCondition(orderState);
    }

    @Override
    public List<AdminLogisticVo> selALogLuiPage(Integer page, Integer limit) {
        return adminLogisticMapper.selALogLuiPage(page, limit);
    }

    @Override
    public List<AdminLogisticVo> selALogLuiAll() {
        return adminLogisticMapper.selALogLuiAll();
    }

    @Override
    public int updateALogByCondition(AdminLogisticPojo adminLogisticPojo) {

        DateConversion dateConversion = new DateConversion();

        adminLogisticPojo.setLogisticDate(dateConversion.Data2Sting());

        return adminLogisticMapper.updateALogByCondition(adminLogisticPojo);
    }

    @Override
    public int deletALogByLId(Integer logisticId) {
        return adminLogisticMapper.deletALogByLId(logisticId);
    }
}
